this._settings.mruSources = sourcesList;
}
- _currentInputSourceChanged(newSource) {
+ _currentInputSourceChanged(newSource, interactive) {
let oldSource;
[oldSource, this._currentSource] = [this._currentSource, newSource];
...this._mruSources.filter(s => s !== newSource),
];
+ // Only track user-initiated switches in backup MRU.
+ // Internal (non-interactive) activations during reload/reapply must not affect restore order.
+ if (interactive && this._disableIBus && this._mruSourcesBackup) {
+ this._mruSourcesBackup = [
+ newSource,
+ ...this._mruSourcesBackup.filter(
+ s => s.type !== newSource.type || s.id !== newSource.id),
+ ];
+ }
+
this._changePerWindowSource();
}
this._ibusManager.setEngine(engine);
- this._currentInputSourceChanged(is);
+ this._currentInputSourceChanged(is, interactive);
if (interactive)
this._updateMruSettings();